import React from 'react'
import { SearchFormSchema } from '@/components/specific/searchform'

export const searchSchema: SearchFormSchema = {
  "title": {
    title: tr('UI名称')
  },
  "entryId": {
    title: tr("关联对象"),
    componentType: "Objectselector"
  },
}

export const gridSchema = [
  {
    fieldName: 'title',
    title: tr('UI名称'),
    width: 120,
    render: (text: string, record: any) => <a href='#' onClick={() => window.open(`/demo/metadata/ui/${record.name}/${record.id}?bizType=${record.bizType}`)}>{text}</a>
  },
  {
    fieldName: 'name',
    width: 120,
    title: tr('编码')
  },
  {
    fieldName: 'bizEntryNameList',
    width: 120,
    title: tr('关联对象')
  },
  {
    fieldName: 'uiType',
    width: 120,
    title: tr('UI类型')
  },
  {
    width: 120,
    fieldName: 'memo',
    title: tr('描述')
  }
]
